package com.cg.design.graphicdesignpattern.state;

import org.junit.Test;

/**
 * State状态模式测试类
 *
 * @program: LeetCode->StateTest
 * @description: State状态模式测试类
 * @author: cg
 * @create: 2022-04-03 15:15
 **/
public class StateTest {

    @Test
    public void testState() {
        SafeFrame frame = new SafeFrame("State Test");
        while (true) {
            for (int hour = 0; hour < 24; hour++) {
                frame.setClock(hour);
                try {
                    Thread.sleep(1000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
            }
        }
    }

}
